To create a database, you must have the Can create database (usecreatedb) right. Refer to Role Designer or User Designer on how to set user properties.
Name
Define the name of the database.
Owner
Define the owner for the database. If omitted, defaults to the user executing the command. Only superusers may create database owned by users other than themselves.
Encoding
Define the encoding for the database. If omitted, the default is the encoding of the template database.
Collation Order
Define the collation order (LC_COLLATE) to use in the new database. This affects the sort order applied to strings, e.g. in queries with ORDER BY, as well as the order used in indexes on text columns. The default is to use the collation order of the template database. See below for additional restrictions.
Note: Support from PostgreSQL 8.4 or later.
Character Classification
Define the character classification (LC_CTYPE) to use in the new database. This affects the categorization of characters, e.g. lower, upper and digit. The default is to use the character classification of the template database. See below for additional restrictions.
Note: Support from PostgreSQL 8.4 or later.
Template
Create the database from a template database.
Note: It is essential that the source database be idle (no data-altering transactions in progress) for the duration of the copying operation. CREATE DATABASE will check that no session (other than itself) is connected to the source database at the start of the operation, but this does not guarantee that changes cannot be made while the copy proceeds, which would result in an inconsistent copied database. Therefore, it is recommended that databases used as templates be treated as read-only.
Tablespace
Define the tablespace for the database. If omitted, defaults to pg_default. See also Tablespaces.
Connection Limit
Define how many concurrent connections can be made to this database. -1 (the default) means no limit.
Note: Support from PostgreSQL 8.1 or later.